function act() {
    cm.openScriptNpc()
}
var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(e, c, b) {
    var d = 8659133;
    status++;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.getMap().getReactorById(d).forceHitReactor(cm.getPlayer(), 1, 407, 224, 0);
            cm.curNodeEventEnd(true);
            cm.setInGameDirectionMode(true, false, true);
            cm.Hidden_background("guide1", 0);
            cm.onTeleport(0, 3, cm.getPlayer().getId(), 305, 215);
            cm.inGameDirectionEvent_ForcedFlip(1);
            cm.inGameDirectionEvent_AskAnswerTime(250)
        } else {
            if (status === a++) {
                cm.inGameDirectionEvent_OneTimeAction(2034, 9999);
                cm.inGameDirectionEvent_QTE(1000)
            } else {
                if (status === a++) {
                    cm.getMap().getReactorById(d).forceHitReactor(cm.getPlayer(), 2, 407, 224, 0);
                    cm.addPopupSay(9400590, 2000, "#face0#快抬起来！", "", 0);
                    cm.inGameDirectionEvent_OneTimeAction(2035, 9999);
                    cm.inGameDirectionEvent_QTE(1000)
                } else {
                    if (status === a++) {
                        cm.spawnMob(9402302, 1, -616, 290);
                        cm.getMap().getReactorById(d).forceHitReactor(cm.getPlayer(), 3, 407, 224, 0);
                        cm.inGameDirectionEvent_OneTimeAction(2036, 9999);
                        cm.inGameDirectionEvent_QTE(1000)
                    } else {
                        if (status === a++) {
                            cm.fieldEffect_PlayFieldSound("Sound/PL_MONAD.img/EP1/ACT1/reactordrop2", 128);
                            cm.npc_ChangeController(9400590, "oid=2279346", 406, 224, 45, 356, 456, 1, true, false);
                            cm.npc_SetSpecialAction("oid=2279346", "summon", 0, 0);
                            cm.npc_SetSpecialAction("oid=2279346", "thankyou", 0, 0);
                            cm.getMap().getReactorById(d).forceHitReactor(cm.getPlayer(), 4, 407, 224, 0);
                            cm.setNumberForQuestInfo(64015, "chk4", 1);
                            cm.inGameDirectionEvent_AskAnswerTime(1000)
                        } else {
                            if (status === a++) {
                                cm.addPopupSay(9400591, 2000, "啊啊啊啊……！", "", 0);
                                cm.inGameDirectionEvent_AskAnswerTime(1000)
                            } else {
                                if (status === a++) {
                                    cm.spawnMob(9402242, 1, 1340, 195);
                                    cm.spawnMob(9402242, 1, 1400, 210);
                                    cm.spawnMob(9402242, 1, 1450, 220);
                                    cm.sendNewEffects(17, [500, 1000, 2000, 1250, 220])
                                } else {
                                    if (status === a++) {
                                        cm.inGameDirectionEvent_AskAnswerTime(3000)
                                    } else {
                                        if (status === a++) {
                                            cm.npc_LeaveField("oid=2279346");
                                            cm.npc_LeaveField("oid=2279346");
                                            cm.sendNewEffects(19, [1000])
                                        } else {
                                            if (status === a++) {
                                                cm.spawnMob(9402308, 1, 406, 128);
                                                cm.setInGameDirectionMode(false, true, false);
                                                cm.Hidden_background("guide2", 1);
                                                cm.playerMessage(-1, "消灭怪物，救出被困在柱子后面的村民！");
                                                cm.dispose()
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
};